package 课设;

import java.util.ArrayList;
import java.util.Scanner;

public class StudentApp {
    public static Scanner scanner = new Scanner(System.in);
    public static ArrayList<Student> students = new ArrayList<>();
    public static void main(String[] args) {
        Student student = new Student();
        StudentManage sm=new StudentManage();
        while(true){
            int menuSelect=StudentManage.getMenu();
            switch (menuSelect){
                case 1://输入学生相关信息
                    sm.addStudent(students);
                    break;
                case 2://2按平均分降序排列
                    sm.sortStudent(students);
                    break;
                case 3:// 3显示所有成绩
                    sm.showAllStudent(students);
                    break;
                case 4: //4输入查询个人成绩
                    sm.searchStudent(students);
                    break;
                case 5://5显示各科平均分，最高分，最低分
                    sm.averageScore(students);
                    break;
                case 6:
                    System.out.println("即将退出成绩管理系统");
                    System.exit(0);
                default:
                    System.out.println("输入错误，请重新输入");
                    break;
            }
        }
    }
}

